package com.learn.java3y.java.object;

import java.util.Date;

/**
 * 浅拷贝：仅仅拷贝了Person对象，而date没有拷贝
 */
public class Person implements Cloneable {

    /**
     * 可变的成员变量
     */
    private Date date;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Person{" +
                "date=" + date +
                '}';
    }
}
